import { getInstance } from "/@/utils/request";

const state = {
    hotel: {}
}

const mutations = {
    setHotel(state, hotel){
        state.hotel = hotel;
    }
}

const actions = {
    async setHotel({commit}){
        let token = localStorage.getItem("token");
        let data = await getInstance(token).get("/hotel/2");
        commit("setHotel", data.data)
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}